package com.ithailong.service;

import com.ithailong.spring.*;

/**
 * author:hlc
 * date:2023/12/25
 */
@Component("userService")
//@Scope("prototype")
public class UserService implements BeanNameAware, InitializingBean {
//   依赖注入
   @Autowired
   private OrderService orderService;
   private String beanName;
   private String xxx;
   public void test(){
      System.out.println("orderService"+orderService);
   }

   public void xxx(){

   }
   @Override
   public void setBeanName(String beanName) {
//      spring会自动去调用
      this.beanName = beanName;
   }
   @Override
   public void afterPropertiesSet() {
      System.out.println("jfksdlafjskl");
   }
}
